package com.atguigu.daijia.dispatch.service;

import com.atguigu.daijia.model.vo.dispatch.NewOrderTaskVo;
import com.atguigu.daijia.model.vo.order.NewOrderDataVo;

import java.util.List;

/**
 * @author 谢忠涵7
 */
public interface NewOrderService {

    /**
     * @description: 添加并开始新订单任务调度
     * @author: xiaoxie
     * @date: 2024/10/27 16:11
     * @param: [newOrderTaskVo]
     * @return: 返回任务id
     **/
    Long addAndStartTask(NewOrderTaskVo newOrderTaskVo);

    /**
     * @description: 执行任务的具体内容
     * @author: xiaoxie
     * @date: 2024/10/27 19:31
     * @param: [jobId] 任务id
     * @return: java.lang.Long
     **/
    void execute(long jobId);

    /**
     * @description: 查询司机新订单数据
     * @author: xiaoxie
     * @date: 2024/10/27 20:18
     * @param: [driverId] 司机id
     * @return: 订单数据
     **/
    List<NewOrderDataVo> findNewOrderQueueData(Long driverId);

    /**
     * @description: 清空新订单队列数据
     * @author: xiaoxie
     * @date: 2024/10/27 20:19
     * @param: [driverId] 司机id
     * @return: java.lang.Boolean
     **/
    Boolean clearNewOrderQueueData(Long driverId);
}
